
import 'dart:ui';

 Color getColor(Color start,Color end,int totalSteps,int steps){
  int a1 = start.alpha;
  int r1 = start.red;
  int g1 = start.green;
  int b1 = start.blue;
  int a2 = end.alpha;
  int r2 = end.red;
  int g2 = end.green;
  int b2 = end.blue;
  double percent=steps*1.0/totalSteps;
  int curA=(a1+(a2-a1)*percent).round();
  int curR=(r1+(r2-r1)*percent).round();
  int curG=(g1+(g2-g1)*percent).round();
  int curB=(b1+(b2-b1)*percent) .round();
  return Color.fromARGB(curA, curR, curG, curB);
}